package com.ctshk.rpc.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ctshk.rpc.system.entity.SysRole;
import com.ctshk.rpc.system.entity.SysUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 谢诗宏
 * @description com.ctshk.rpc.system.mapper
 * @date 2020/12/9
 */
public interface SysRoleMapper extends BaseMapper<SysRole> {

    @Select("SELECT GROUP_CONCAT(name) FROM `t_sys_role` WHERE id IN (${ids})")
    String getRoleName(@Param("ids") String ids);

    @Select("SELECT role_code FROM `t_sys_role` WHERE id IN (${ids})")
    List<String> getRoleCode(@Param("ids") String ids);

}
